<div class="form">

<?php $form = $this->beginWidget('CActiveForm', array(
    'id' => 'users-form',
    'enableAjaxValidation' => true,
)); ?>

    <p class="note">Поля, отмеченные <span class="required">*</span> обязательны к заполнению.</p>

    <?php echo $form->errorSummary($model); ?>

    <div class="row">
        <?php echo $form->labelEx($model, 'password1'); ?>
        <?php echo $form->passwordField($model, 'password1', array('size' => 60, 'maxlength' => 128)); ?>
        <?php echo $form->error($model, 'password1'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'password2'); ?>
        <?php echo $form->passwordField($model, 'password2', array('size' => 60, 'maxlength' => 128)); ?>
        <?php echo $form->error($model, 'password2'); ?>
    </div>

    <div class="row buttons">
        <?php echo CHtml::submitButton('Сохранить'); ?>
    </div>

<?php $this->endWidget(); ?>

</div><!-- form -->